/*
 * @Description:
 * @Version: 2.0
 * @Autor: wangmiao
 * @Date: 2022-08-22 13:12:41
 * @LastEditors: wangmiao
 * @LastEditTime: 2022-08-22 13:18:05
 */
import { ElMessage } from "element-plus";

export const useMessage = (type = "", info: string) => {
  switch (type) {
    case "success":
      ElMessage({
        showClose: true,
        message: info,
        type: "success",
      });
      break;
    case "error":
      ElMessage({
        showClose: true,
        message: info,
        type: "error",
      });
      break;

    default:
      break;
  }
};
